/**
 * 
 */
package com.ams.action;

import com.ams.entity.User;
import com.ams.service.SampleService;

/**
 * encoding=UTF-8
 *
 * @author Yang Ji
 *Aug 23, 2011   10:19:50 PM
 */
public class SampleActionImp extends BasicAction implements SampleAction {

	private User user;
	private SampleService sampleService;
	
	@Override
	public String login() {
		String skip="FAILD";
		User checkUser=sampleService.checkUser(user.getUserName(), user.getPassword());
		if(checkUser!=null){
			skip="SUCCESS";
			this.getSession().put("user",user);
		}
		return skip;
	}

	public User getUser() {
		return user;
	}

	public void setUser(User user) {
		this.user = user;
	}

	public void setSampleService(SampleService sampleService) {
		this.sampleService = sampleService;
	}
	
	

}
